//
//  SystemMsgViewCell.m
//  share_business
//
//  Created by 朱永福 on 2017/9/24.
//  Copyright © 2017年 wyl. All rights reserved.
//

#import "SystemMsgViewCell.h"

@implementation SystemMsgViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self.contentView addSubview:self.label];
        
        
        
        
    }
    return self;
}

- (UILabel *)label{
    if (!_label) {
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 50, self.contentView.bounds.size.height)];
        _label.textAlignment = NSTextAlignmentCenter;
        _label.font = [UIFont systemFontOfSize:15];
        _label.backgroundColor = [UIColor clearColor];
        
    }
    return _label;
}

//处理选中背景色问题
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    if (!self.editing) {
        return;
    }
    [super setSelected:selected animated:animated];
    
    if (self.editing) {
        self.contentView.backgroundColor = [UIColor clearColor];
        self.backgroundColor = [UIColor clearColor];
        //        self.textLabel.backgroundColor = [UIColor clearColor];
        //        self.detailTextLabel.backgroundColor = [UIColor clearColor];
        self.label.backgroundColor = [UIColor clearColor];
        
        
    }
}

@end
